package com.yyg.boot.bind;

import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.support.WebBindingInitializer;

import java.util.Date;

/**
 * @Description 扩展web初始化的配置,WebBindingInitializer实现全局属性编辑器配置
 * @Author 一一哥Sun
 * @Date Created in 2020/3/24
 */
public class CustomDateWebBindingInitializer implements WebBindingInitializer {

    @Override
    public void initBinder(WebDataBinder binder) {
        binder.registerCustomEditor(Date.class, new MyCustomDateEditor());
    }

}
